
component accessors="true" output="false" extends="AbsDelegate"
{

	property name="CommentFactory" type="it.millemultimedia.easyBlog.factory.CommentFactory";

	public it.millemultimedia.easyBlog.delegate.CommentDelegate function init( required Any dataObject ){
		
		variables.dataObject = arguments.dataObject;
		
		return this;
	}
	
	public it.millemultimedia.easyBlog.validator.CommentValidator function getValidator(){
		
		return getCommentFactory().getValidator();
	}
	
	public it.millemultimedia.easyBlog.model.Comment function createInstance(){
		
		return getCommentFactory().createInstance();
	}

	public void function create( required Any Comment ){
		
		variables.dataObject.create( argumentCollection=arguments );
		
	}

	public void function update( required Any Comment ){
		
		variables.dataObject.update( argumentCollection=arguments );
		
	}

	public it.millemultimedia.easyBlog.model.Comment function read( required Any Comment ){
	
		var list = "";
		var Comments = variables.dataObject.read( arguments.Comment );
		
		Comment = getCommentFactory().get( Comments );
		
		
		return Comment;
		
	}

	public void function delete( required Any Comment ){
		
		variables.dataObject.delete( argumentCollection=arguments );
		
	}

	public it.millemultimedia.easyBlog.model.Comment[] function list( required Any Comment, Numeric start=0, Numeric count=0 ){
	
		var list = "";
		var Comments = variables.dataObject.list( arguments.Comment );
		
		list = getCommentFactory().list( Comments, arguments.start, arguments.count );
		
		
		return list;
		
	}

}


